package com.sc.user.controller;

import com.sc.common.domain.Result;
import com.sc.user.domain.dto.LoginDto;
import com.sc.user.service.ApUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/api/v1/login")
public class ApUserController {
    @Autowired
    private ApUserService apUserService;

    @PostMapping("/login_auth")
    public Result login(@RequestBody LoginDto loginDto) {
        log.info("用户登录:{}", loginDto);
        return apUserService.login(loginDto);
    }

}
